calculating opportunity cost with a simple formula